import updateManager from './common/updateManager';
import {initRegisterState, REGISTER_STATE, wxRegister} from './utils/request'
App({
  onLaunch: function () {
  },
  onShow: function () {
    updateManager();
    initRegisterState();
    setTimeout(() => {
      const register_state = wx.getStorageSync(REGISTER_STATE);
      if (!register_state) {
        wx.showModal({
          title: '注册',
          content: '请确认授权',
          showCancel: false,
          complete: (res) => {
            if (res.confirm) {
              wxRegister();
            }
          }
        })
      }
    }, 2000);
  },
});
